web3.js web3.utils.hexToNumber
web3.utils.hexToNumber(hex)
web3.utils.toDecimal(hex) // ALIAS, deprecated
ζΈ‘γ•γ‚ŒγŸ16ι€²ζ•°ζ–‡ε­—εˆ—γ‚’ζ•°ε€€εž‹γ«ε€‰ζ›γ—γΎγ™γ€‚
注意
倧きγͺε€€γ‚’ζ‰±γ†ε ΄εˆγ―γ€web3.utils.toBN を使用してください。
パラパータ
1. hexString - String|HEX
ζˆ»γ‚Šε€€
Number
ァンプル
code:example.js
web3.utils.hexToNumber('0xea');
234
参考
https://web3js.readthedocs.io/en/1.0/web3-utils.html#hextonumber
#web3.js #web3.js@1.0
web3.js ζ—₯本θͺž API γƒͺフゑレンス